package com.ehome.poct.base.api.dto.device.bootModule;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel("通讯模块")
public class CommunicationModuleDTO {
    @ApiModelProperty(value = "模块是否通过")
    private Boolean pass;
    @ApiModelProperty(value = "hgb")
    private HGBInfo hgb;
    @ApiModelProperty(value="日志")
    private LogInfo log;
    @ApiModelProperty(value="motor")
    private MotorInfo motor;
    @ApiModelProperty(value="motor")
    private CommonInfo common;

    @Data
   public class HGBInfo{
        @ApiModelProperty("average均值")
        private BigDecimal average;
        @ApiModelProperty("median中位值")
        private BigDecimal median;
        @ApiModelProperty("variance方差")
        private BigDecimal variance;
    }

    @Data
    public class LogInfo{
        @ApiModelProperty("日志串口误包率")
        private BigDecimal failureRate;
    }

    @Data
    public class MotorInfo{
        @ApiModelProperty("电机串口误包率")
        private BigDecimal failureRate;
    }

    @Data
    public class CommonInfo{
        @ApiModelProperty("通讯串口误包率")
        private BigDecimal failureRate;
    }
}
